# 后台管理子路由文件
from django.urls import path
from myadmin.views import index
from django.conf import settings
from django.conf.urls import static

from myadmin.views import user
from myadmin.views import OpenStackFlavor
from myadmin.views import OpenStackImage
from myadmin.views import OpenStackNetwork


urlpatterns = [
    path('admin', index.index, name='myadmin_index'),
    path('login', index.login, name='myadmin_login'),
    path('dologin', index.dologin, name='myadmin_dologin'),
    path('logout', index.logout, name='myadmin_logout'),
    path('verifycode', index.verifycode, name='myadmin_verifycode'),

    # 用户信息管理路由
    path('user/index', user.index, name='myadmin_user_index'),
    path('user/add', user.add, name='myadmin_user_add'),
    path('user/insert', user.insert, name='myadmin_user_insert'),
    path('user/edit/<int:uid>', user.edit, name='myadmin_user_edit'),
    path('user/delete/<int:uid>', user.delete, name='myadmin_user_delete'),
    path('user/update', user.update, name='myadmin_user_update'),

    # openstack flavor路由
    path('flavor/index', OpenStackFlavor.index, name='myadmin_flavor_index'),
    path('flavor/add', OpenStackFlavor.add, name='myadmin_flavor_add'),
    path('flavor/insert', OpenStackFlavor.insert, name='myadmin_flavor_insert'),
    path('flavor/edit/<str:id>', OpenStackFlavor.edit, name='myadmin_flavor_edit'),
    path('flavor/delete/<str:id>', OpenStackFlavor.delete, name='myadmin_flavor_delete'),
    path('flavor/update', OpenStackFlavor.update, name='myadmin_flavor_update'),

    # openstack image路由
    path('image/index', OpenStackImage.index, name='myadmin_image_index'),
    path('image/add', OpenStackImage.add, name='myadmin_image_add'),
    path('image/insert', OpenStackImage.insert, name='myadmin_image_insert'),
    path('image/edit/<str:id>', OpenStackImage.edit, name='myadmin_image_edit'),
    path('image/delete/<str:id>', OpenStackImage.delete, name='myadmin_image_delete'),
    path('image/update', OpenStackImage.update, name='myadmin_image_update'),

    # openstack network路由
    path('network/index', OpenStackNetwork.index, name='myadmin_network_index'),
    path('network/add', OpenStackNetwork.add, name='myadmin_network_add'),
    path('network/insert', OpenStackNetwork.insert, name='myadmin_network_insert'),
    path('network/edit/<str:id>', OpenStackNetwork.edit, name='myadmin_network_edit'),
    path('network/delete/<str:id>', OpenStackNetwork.delete, name='myadmin_network_delete'),
    path('network/update', OpenStackNetwork.update, name='myadmin_network_update'),


]
